<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>全球最美最美徒步 - 全球最美平台</title>
    <!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Font Awesome 图标 -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    
    <style>
        :root {
            --primary: #3b82f6;
            --secondary: #8b5cf6;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --text-tertiary: #94a3b8;
            --bg-light: #f8fafc;
            --bg-white: #ffffff;
            --border-light: #e2e8f0;
            --radius: 12px;
            --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
            background-color: var(--bg-light);
            color: var(--text-primary);
            padding-top: 56px;
            padding-bottom: 70px;
        }
        
        /* 顶部导航 */
        .top-nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: 56px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 16px;
            z-index: 1000;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            border-bottom: 1px solid var(--border-light);
        }
        
        .nav-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary);
            text-align: center;
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .nav-btn {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: none;
            border: none;
            color: var(--text-secondary);
            font-size: 20px;
        }
        
        .nav-btn.primary {
            color: var(--primary);
        }
        
        /* 专题头部 */
        .topic-header {
            background-color: var(--bg-white);
            padding-bottom: 16px;
        }
        
        .topic-banner {
            width: 100%;
            height: 160px;
            position: relative;
            overflow: hidden;
        }
        
        .topic-banner img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .topic-banner-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 60%;
            background: linear-gradient(transparent, rgba(0,0,0,0.7));
        }
        
        .topic-info {
            padding: 0 16px;
            margin-top: -40px;
            position: relative;
        }
        
        .topic-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            border: 4px solid var(--bg-white);
            object-fit: cover;
        }
        
        .topic-title-container {
            margin-top: 12px;
        }
        
        .topic-title {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 6px;
        }
        
        .topic-meta {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 13px;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }
        
        .topic-creator {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .topic-creator-avatar {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .topic-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 16px;
        }
        
        .topic-tag {
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 12px;
            background-color: rgba(59, 130, 246, 0.1);
            color: var(--primary);
        }
        
        .topic-actions {
            display: flex;
            gap: 10px;
            margin-bottom: 12px;
        }
        
        .topic-action {
            flex: 1;
            padding: 10px;
            border-radius: 8px;
            font-size: 15px;
            font-weight: 500;
            text-align: center;
            border: none;
        }
        
        .topic-action.primary {
            background-color: var(--primary);
            color: white;
        }
        
        .topic-action.secondary {
            background-color: var(--bg-light);
            color: var(--text-primary);
        }
        
        .topic-description {
            font-size: 15px;
            line-height: 1.6;
            color: var(--text-primary);
            margin-bottom: 16px;
            padding: 0 16px;
        }
        
        .topic-stats {
            display: flex;
            justify-content: space-around;
            padding: 16px;
            background-color: var(--bg-light);
            border-top: 1px solid var(--border-light);
            border-bottom: 1px solid var(--border-light);
        }
        
        .topic-stat {
            text-align: center;
        }
        
        .stat-value {
            font-size: 18px;
            font-weight: 700;
            color: var(--text-primary);
        }
        
        .stat-label {
            font-size: 12px;
            color: var(--text-secondary);
        }
        
        /* 内容导航 */
        .content-tabs {
            display: flex;
            background-color: var(--bg-white);
            border-bottom: 1px solid var(--border-light);
        }
        
        .content-tab {
            flex: 1;
            padding: 14px 0;
            text-align: center;
            font-size: 15px;
            font-weight: 500;
            color: var(--text-secondary);
            border-bottom: 2px solid transparent;
            background: none;
            border: none;
        }
        
        .content-tab.active {
            color: var(--primary);
            border-bottom: 2px solid var(--primary);
        }
        
        /* 专题内容区域 */
        .topic-content {
            padding: 16px;
        }
        
        /* 专题帖子样式 */
        .topic-post {
            background-color: var(--bg-white);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            margin-bottom: 16px;
            overflow: hidden;
        }
        
        .post-header {
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .post-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .post-author {
            flex: 1;
        }
        
        .author-name {
            font-size: 15px;
            font-weight: 600;
            margin-bottom: 2px;
        }
        
        .post-time {
            font-size: 12px;
            color: var(--text-tertiary);
        }
        
        .post-menu {
            color: var(--text-tertiary);
            background: none;
            border: none;
            font-size: 16px;
        }
        
        .post-content {
            padding: 0 16px 12px;
        }
        
        .post-text {
            font-size: 15px;
            line-height: 1.6;
            margin-bottom: 12px;
        }
        
        /* 帖子图片样式 */
        .post-images {
            margin-bottom: 12px;
        }
        
        .post-single-image img {
            width: 100%;
            border-radius: 8px;
            object-fit: cover;
        }
        
        .post-multi-images {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
            border-radius: 8px;
            overflow: hidden;
        }
        
        .post-multi-images .image-item {
            aspect-ratio: 1/1;
            overflow: hidden;
        }
        
        .post-multi-images img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        /* 帖子底部操作 */
        .post-actions {
            padding: 8px 16px;
            display: flex;
            justify-content: space-around;
            border-top: 1px solid var(--border-light);
        }
        
        .post-action {
            display: flex;
            align-items: center;
            gap: 6px;
            color: var(--text-secondary);
            background: none;
            border: none;
            font-size: 14px;
            padding: 6px 0;
        }
        
        .post-action.liked {
            color: var(--danger);
        }
        
        /* 留言区 */
        .comments-section {
            padding: 0 16px 16px;
        }
        
        .comments-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }
        
        .comments-title {
            font-size: 16px;
            font-weight: 600;
        }
        
        .comments-count {
            color: var(--text-tertiary);
        }
        
        .comment-input-container {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .comment-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
        }
        
        .comment-input-group {
            flex: 1;
        }
        
        .comment-input {
            width: 100%;
            padding: 10px 12px;
            border-radius: 20px;
            border: 1px solid var(--border-light);
            background-color: var(--bg-white);
            font-size: 14px;
            outline: none;
            resize: none;
            height: 40px;
        }
        
        .comment-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 8px;
        }
        
        .comment-action {
            padding: 4px 12px;
            border-radius: 16px;
            font-size: 13px;
            border: none;
        }
        
        .comment-action.cancel {
            background-color: var(--bg-light);
            color: var(--text-secondary);
        }
        
        .comment-action.send {
            background-color: var(--primary);
            color: white;
        }
        
        /* 留言列表 */
        .comments-list {
            margin-bottom: 20px;
        }
        
        .comment-item {
            display: flex;
            gap: 10px;
            margin-bottom: 16px;
        }
        
        .comment-content {
            flex: 1;
        }
        
        .comment-bubble {
            background-color: var(--bg-white);
            border-radius: 18px;
            padding: 8px 14px;
            margin-bottom: 6px;
            box-shadow: var(--shadow);
        }
        
        .comment-text {
            font-size: 14px;
            line-height: 1.5;
        }
        
        .comment-meta {
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 12px;
            color: var(--text-tertiary);
        }
        
        .comment-author {
            font-weight: 500;
            color: var(--text-primary);
        }
        
        .comment-actions {
            display: flex;
            gap: 12px;
        }
        
        .comment-action-btn {
            color: var(--text-tertiary);
            background: none;
            border: none;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        .comment-action-btn.liked {
            color: var(--danger);
        }
        
        /* 回复样式 */
        .replies {
            margin-left: 46px;
            margin-top: 8px;
        }
        
        .reply-item {
            display: flex;
            gap: 8px;
            margin-bottom: 12px;
        }
        
        .reply-content {
            flex: 1;
        }
        
        .reply-bubble {
            background-color: var(--bg-light);
            border-radius: 16px;
            padding: 6px 12px;
            margin-bottom: 4px;
        }
        
        .reply-text {
            font-size: 13px;
            line-height: 1.5;
        }
        
        .reply-text .reply-to {
            color: var(--primary);
            font-weight: 500;
        }
        
        /* 底部导航 */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            height: 70px;
            background-color: var(--bg-white);
            display: flex;
            justify-content: space-around;
            align-items: center;
            border-top: 1px solid var(--border-light);
            z-index: 1000;
        }
        
        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            color: var(--text-tertiary);
            font-size: 11px;
            gap: 4px;
            text-decoration: none;
            flex: 1;
        }
        
        .nav-item.active {
            color: var(--primary);
        }
        
        .nav-icon {
            font-size: 22px;
        }
        
        /* 提示消息 */
        .toast {
            position: fixed;
            bottom: 90px;
            left: 50%;
            transform: translateX(-50%);
            background-color: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 8px 16px;
            border-radius: 6px;
            z-index: 9999;
            font-size: 14px;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        
        .toast.show {
            opacity: 1;
        }
        
        /* 加载更多 */
        .load-more {
            width: 100%;
            padding: 12px;
            border-radius: 8px;
            background-color: var(--bg-white);
            border: 1px solid var(--border-light);
            color: var(--text-primary);
            font-size: 15px;
            margin-top: 8px;
        }
    </style>
</head>
<body>
    <!-- 顶部导航 -->
    <div class="top-nav">
        <button class="nav-btn" id="backBtn">
            <i class="fas fa-arrow-left"></i>
        </button>
        <div class="nav-title">全球最美徒步路线大赏</div>
        <button class="nav-btn primary" id="shareBtn">
            <i class="fas fa-share-alt"></i>
        </button>
    </div>
    
    <!-- 专题头部 -->
    <div class="topic-header">
        <div class="topic-banner">
            <img src="https://picsum.photos/id/29/1200/400" alt="专题封面">
            <div class="topic-banner-overlay"></div>
        </div>
        
        <div class="topic-info">
            <img src="https://picsum.photos/id/64/200/200" alt="专题头像" class="topic-avatar">
            
            <div class="topic-title-container">
                <h1 class="topic-title">全球最美徒步路线大赏</h1>
                
                <div class="topic-meta">
                    <div class="topic-creator">
                        <img src="https://picsum.photos/id/64/100/100" alt="创建者头像" class="topic-creator-avatar">
                        <span>旅行摄影联盟</span>
                    </div>
                    <span>创建于 2023-05-18</span>
                </div>
                
                <div class="topic-tags">
                    <span class="topic-tag">徒步</span>
                    <span class="topic-tag">旅行</span>
                    <span class="topic-tag">摄影</span>
                    <span class="topic-tag">户外</span>
                    <span class="topic-tag">自然</span>
                </div>
                
                <div class="topic-actions">
                    <button class="topic-action primary" id="joinBtn">已加入</button>
                    <button class="topic-action secondary" id="inviteBtn">
                        <i class="fas fa-user-plus me-1"></i> 邀请
                    </button>
                    <button class="topic-action secondary" id="moreBtn">
                        <i class="fas fa-ellipsis-h"></i>
                    </button>
                </div>
            </div>
        </div>
        
        <div class="topic-description">
            收集全球最值得一去的徒步路线，分享徒步经验、装备清单和绝美风景，欢迎所有徒步爱好者加入交流。无论你是经验丰富的徒步达人，还是刚刚入门的新手，这里都有适合你的内容和伙伴。
        </div>
        
        <div class="topic-stats">
            <div class="topic-stat">
                <div class="stat-value">1.2k</div>
                <div class="stat-label">成员</div>
            </div>
            <div class="topic-stat">
                <div class="stat-value">356</div>
                <div class="stat-label">讨论</div>
            </div>
            <div class="topic-stat">
                <div class="stat-value">892</div>
                <div class="stat-label">图片</div>
            </div>
            <div class="topic-stat">
                <div class="stat-value">42</div>
                <div class="stat-label">路线</div>
            </div>
        </div>
    </div>
    
    <!-- 内容导航 -->
    <div class="content-tabs">
        <button class="content-tab active" data-tab="posts">帖子</button>
        <button class="content-tab" data-tab="members">成员</button>
        <button class="content-tab" data-tab="albums">相册</button>
        <button class="content-tab" data-tab="info">详情</button>
    </div>
    
    <!-- 专题内容区域 -->
    <div class="topic-content" id="postsContent">
        <!-- 专题帖子 - 多图 -->
        <div class="topic-post">
            <div class="post-header">
                <img src="https://picsum.photos/id/64/100/100" alt="作者头像" class="post-avatar">
                <div class="post-author">
                    <div class="author-name">旅行摄影联盟</div>
                    <div class="post-time">3天前</div>
                </div>
                <button class="post-menu">
                    <i class="fas fa-ellipsis-h"></i>
                </button>
            </div>
            
            <div class="post-content">
                <div class="post-text">
                    瑞士阿尔卑斯山脉的徒步路线绝对是一生必去！这里分享一些我去年拍摄的照片，沿途的风景美不胜收，随手一拍都是壁纸级别的画面。
                </div>
                
                <div class="post-images post-multi-images">
                    <div class="image-item">
                        <img src="https://picsum.photos/id/29/300/300" alt="帖子图片1">
                    </div>
                    <div class="image-item">
                        <img src="https://picsum.photos/id/30/300/300" alt="帖子图片2">
                    </div>
                    <div class="image-item">
                        <img src="https://picsum.photos/id/31/300/300" alt="帖子图片3">
                    </div>
                </div>
            </div>
            
            <div class="post-actions">
                <button class="post-action liked">
                    <i class="fas fa-heart"></i>
                    <span>128</span>
                </button>
                <button class="post-action">
                    <i class="far fa-comment"></i>
                    <span>32</span>
                </button>
                <button class="post-action">
                    <i class="far fa-bookmark"></i>
                    <span>收藏</span>
                </button>
                <button class="post-action">
                    <i class="fas fa-share-alt"></i>
                    <span>分享</span>
                </button>
            </div>
        </div>
        
        <!-- 专题帖子 - 单图 -->
        <div class="topic-post">
            <div class="post-header">
                <img src="https://picsum.photos/id/91/100/100" alt="作者头像" class="post-avatar">
                <div class="post-author">
                    <div class="author-name">山野徒步者</div>
                    <div class="post-time">1周前</div>
                </div>
                <button class="post-menu">
                    <i class="fas fa-ellipsis-h"></i>
                </button>
            </div>
            
            <div class="post-content">
                <div class="post-text">
                    推荐一条国内的徒步路线：云南虎跳峡高线徒步。全程约22公里，难度适中，沿途可以欣赏到壮丽的峡谷风光，还能体验当地纳西族的风土人情。最佳徒步季节是4-5月和9-10月。
                </div>
                
                <div class="post-images post-single-image">
                    <img src="https://picsum.photos/id/28/600/400" alt="帖子图片">
                </div>
            </div>
            
            <div class="post-actions">
                <button class="post-action">
                    <i class="far fa-heart"></i>
                    <span>86</span>
                </button>
                <button class="post-action">
                    <i class="far fa-comment"></i>
                    <span>18</span>
                </button>
                <button class="post-action">
                    <i class="far fa-bookmark"></i>
                    <span>收藏</span>
                </button>
                <button class="post-action">
                    <i class="fas fa-share-alt"></i>
                    <span>分享</span>
                </button>
            </div>
        </div>
        
        <!-- 专题帖子 - 无图 -->
        <div class="topic-post">
            <div class="post-header">
                <img src="https://picsum.photos/id/22/100/100" alt="作者头像" class="post-avatar">
                <div class="post-author">
                    <div class="author-name">徒步装备控</div>
                    <div class="post-time">2周前</div>
                </div>
                <button class="post-menu">
                    <i class="fas fa-ellipsis-h"></i>
                </button>
            </div>
            
            <div class="post-content">
                <div class="post-text">
                    给大家分享一下我的徒步装备清单，适合3-5天的徒步旅行：
                    
                    1. 背包：60L左右，带防雨罩
                    2. 鞋子：中高帮徒步鞋，防水透气
                    3. 衣物：速干衣裤、抓绒衣、冲锋衣裤
                    4. 帐篷：轻量化双人帐（如果结伴）
                    5. 睡袋：根据温度选择合适温标
                    6. 其他：登山杖、头灯、水壶、急救包
                    
                    大家有什么补充的可以在评论区交流~
                </div>
            </div>
            
            <div class="post-actions">
                <button class="post-action">
                    <i class="far fa-heart"></i>
                    <span>54</span>
                </button>
                <button class="post-action">
                    <i class="far fa-comment"></i>
                    <span>42</span>
                </button>
                <button class="post-action">
                    <i class="far fa-bookmark"></i>
                    <span>收藏</span>
                </button>
                <button class="post-action">
                    <i class="fas fa-share-alt"></i>
                    <span>分享</span>
                </button>
            </div>
        </div>
        
        <!-- 加载更多帖子 -->
        <button class="load-more" id="loadMorePosts">加载更多帖子</button>
    </div>
    
    <!-- 留言区 -->
    <div class="comments-section">
        <div class="comments-header">
            <h3 class="comments-title">讨论区 <span class="comments-count">(32)</span></h3>
        </div>
        
        <!-- 留言输入框 -->
        <div class="comment-input-container">
            <img src="https://picsum.photos/id/64/100/100" alt="用户头像" class="comment-avatar">
            <div class="comment-input-group">
                <textarea class="comment-input" placeholder="分享你的想法..."></textarea>
                <div class="comment-actions">
                    <button class="comment-action cancel">取消</button>
                    <button class="comment-action send">发送</button>
                </div>
            </div>
        </div>
        
        <!-- 留言列表 -->
        <div class="comments-list">
            <!-- 留言1 -->
            <div class="comment-item">
                <img src="https://picsum.photos/id/91/100/100" alt="评论者头像" class="comment-avatar">
                <div class="comment-content">
                    <div class="comment-bubble">
                        <div class="comment-text">请问有人走过尼泊尔的ABC徒步路线吗？难度怎么样？需要准备哪些特殊装备？</div>
                    </div>
                    <div class="comment-meta">
                        <span class="comment-author">山野徒步者</span>
                        <span>2天前</span>
                        <div class="comment-actions">
                            <button class="comment-action-btn">
                                <i class="far fa-heart"></i> 12
                            </button>
                            <button class="comment-action-btn reply-btn">
                                <i class="far fa-comment"></i> 回复
                            </button>
                        </div>
                    </div>
                    
                    <!-- 回复列表 -->
                    <div class="replies">
                        <!-- 回复1 -->
                        <div class="reply-item">
                            <img src="https://picsum.photos/id/64/100/100" alt="回复者头像" class="comment-avatar">
                            <div class="comment-content">
                                <div class="reply-bubble">
                                    <div class="reply-text">
                                        <span class="reply-to">@山野徒步者</span> 我去年走过，难度中等，需要准备好保暖衣物，即使夏天也可能遇到低温，建议带一件轻便的羽绒服。
                                    </div>
                                </div>
                                <div class="comment-meta">
                                    <span class="comment-author">旅行摄影联盟</span>
                                    <span>1天前</span>
                                    <div class="comment-actions">
                                        <button class="comment-action-btn liked">
                                            <i class="fas fa-heart"></i> 8
                                        </button>
                                        <button class="comment-action-btn reply-btn">
                                            <i class="far fa-comment"></i> 回复
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 回复2 -->
                        <div class="reply-item">
                            <img src="https://picsum.photos/id/22/100/100" alt="回复者头像" class="comment-avatar">
                            <div class="comment-content">
                                <div class="reply-bubble">
                                    <div class="reply-text">
                                        <span class="reply-to">@山野徒步者</span> 路线很成熟，不需要太专业的装备，但一双好的徒步鞋非常重要，每天徒步时间较长，鞋子不舒服会很影响体验。
                                    </div>
                                </div>
                                <div class="comment-meta">
                                    <span class="comment-author">徒步装备控</span>
                                    <span>18小时前</span>
                                    <div class="comment-actions">
                                        <button class="comment-action-btn">
                                            <i class="far fa-heart"></i> 5
                                        </button>
                                        <button class="comment-action-btn reply-btn">
                                            <i class="far fa-comment"></i> 回复
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 留言2 -->
            <div class="comment-item">
                <img src="https://picsum.photos/id/45/100/100" alt="评论者头像" class="comment-avatar">
                <div class="comment-content">
                    <div class="comment-bubble">
                        <div class="comment-text">推荐一条挪威的徒步路线：Trolltunga（恶魔之舌），虽然往返要27公里，但看到那个悬崖上的岩石平台，一切都值了！</div>
                    </div>
                    <div class="comment-meta">
                        <span class="comment-author">北欧旅行者</span>
                        <span>3天前</span>
                        <div class="comment-actions">
                            <button class="comment-action-btn liked">
                                <i class="fas fa-heart"></i> 28
                            </button>
                            <button class="comment-action-btn reply-btn">
                                <i class="far fa-comment"></i> 回复
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- 留言3 -->
            <div class="comment-item">
                <img src="https://picsum.photos/id/54/100/100" alt="评论者头像" class="comment-avatar">
                <div class="comment-content">
                    <div class="comment-bubble">
                        <div class="comment-text">有没有适合新手的短途徒步路线推荐？最好是当天能往返的那种。</div>
                    </div>
                    <div class="comment-meta">
                        <span class="comment-author">徒步新手</span>
                        <span>1天前</span>
                        <div class="comment-actions">
                            <button class="comment-action-btn">
                                <i class="far fa-heart"></i> 3
                            </button>
                            <button class="comment-action-btn reply-btn">
                                <i class="far fa-comment"></i> 回复
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 加载更多评论 -->
        <button class="load-more" id="loadMoreComments">加载更多评论</button>
    </div>
    
    <!-- 底部导航 -->
    <div class="bottom-nav">
        <a href="#" class="nav-item">
            <i class="fas fa-home nav-icon"></i>
            <span>首页</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-compass nav-icon"></i>
            <span>发现</span>
        </a>
        <a href="#" class="nav-item active">
            <i class="fas fa-thumbtack nav-icon"></i>
            <span>专题</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-bell nav-icon"></i>
            <span>通知</span>
        </a>
        <a href="#" class="nav-item">
            <i class="fas fa-user nav-icon"></i>
            <span>我的</span>
        </a>
    </div>
    
    <!-- 提示消息 -->
    <div class="toast" id="toast"></div>
    
    <!-- 专题操作菜单 -->
    <div class="modal fade" id="topicMenuModal" tabindex="-1">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-body p-0">
                    <button class="btn w-100 text-start px-4 py-3 border-0" style="font-size: 15px;">
                        <i class="fas fa-bookmark me-2"></i> 收藏专题
                    </button>
                    <button class="btn w-100 text-start px-4 py-3 border-0" style="font-size: 15px;">
                        <i class="fas fa-flag me-2"></i> 举报专题
                    </button>
                    <div class="dropdown-divider m-0"></div>
                    <button class="btn w-100 text-start px-4 py-3 border-0 text-danger" style="font-size: 15px;">
                        <i class="fas fa-sign-out-alt me-2"></i> 退出专题
                    </button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Bootstrap JS Bundle with Popper -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    
    <script>
        // DOM元素
        const backBtn = document.getElementById('backBtn');
        const shareBtn = document.getElementById('shareBtn');
        const joinBtn = document.getElementById('joinBtn');
        const inviteBtn = document.getElementById('inviteBtn');
        const moreBtn = document.getElementById('moreBtn');
        const contentTabs = document.querySelectorAll('.content-tab');
        const postsContent = document.getElementById('postsContent');
        const loadMorePosts = document.getElementById('loadMorePosts');
        const loadMoreComments = document.getElementById('loadMoreComments');
        const toast = document.getElementById('toast');
        const topicMenuModal = new bootstrap.Modal(document.getElementById('topicMenuModal'));
        const commentInput = document.querySelector('.comment-input');
        const sendCommentBtn = document.querySelector('.comment-action.send');
        const cancelCommentBtn = document.querySelector('.comment-action.cancel');
        const postActions = document.querySelectorAll('.post-action');
        const commentActionBtns = document.querySelectorAll('.comment-action-btn');
        const replyBtns = document.querySelectorAll('.reply-btn');
        
        // 显示提示消息
        function showToast(message) {
            toast.textContent = message;
            toast.classList.add('show');
            
            clearTimeout(toast.timeout);
            toast.timeout = setTimeout(() => {
                toast.classList.remove('show');
            }, 2000);
        }
        
        // 切换内容标签
        function switchContentTab(tabName) {
            contentTabs.forEach(tab => {
                if (tab.getAttribute('data-tab') === tabName) {
                    tab.classList.add('active');
                } else {
                    tab.classList.remove('active');
                }
            });
            
            // 这里可以根据需要加载不同标签的内容
            showToast(`已切换到${tabName === 'posts' ? '帖子' : 
                       tabName === 'members' ? '成员' : 
                       tabName === 'albums' ? '相册' : '详情'}页面`);
        }
        
        // 绑定事件
        function bindEvents() {
            // 返回按钮
            backBtn.addEventListener('click', () => {
                history.back();
                showToast('返回专题列表');
            });
            
            // 分享按钮
            shareBtn.addEventListener('click', () => {
                showToast('专题分享功能');
            });
            
            // 加入/退出专题按钮
            joinBtn.addEventListener('click', () => {
                if (joinBtn.textContent === '已加入') {
                    joinBtn.textContent = '加入专题';
                    joinBtn.classList.remove('primary');
                    joinBtn.classList.add('secondary');
                    showToast('已退出专题');
                } else {
                    joinBtn.textContent = '已加入';
                    joinBtn.classList.remove('secondary');
                    joinBtn.classList.add('primary');
                    showToast('成功加入专题');
                }
            });
            
            // 邀请按钮
            inviteBtn.addEventListener('click', () => {
                showToast('邀请好友加入专题');
            });
            
            // 更多操作按钮
            moreBtn.addEventListener('click', () => {
                topicMenuModal.show();
            });
            
            // 内容标签切换
            contentTabs.forEach(tab => {
                tab.addEventListener('click', function() {
                    const tabName = this.getAttribute('data-tab');
                    switchContentTab(tabName);
                });
            });
            
            // 加载更多帖子
            loadMorePosts.addEventListener('click', function() {
                this.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 加载中...';
                setTimeout(() => {
                    this.textContent = '加载更多帖子';
                    showToast('已加载全部帖子');
                }, 1500);
            });
            
            // 加载更多评论
            loadMoreComments.addEventListener('click', function() {
                this.innerHTML = '<i class="fas fa-spinner fa-spin"></i> 加载中...';
                setTimeout(() => {
                    this.textContent = '加载更多评论';
                    showToast('已加载全部评论');
                }, 1500);
            });
            
            // 帖子操作按钮
            postActions.forEach(action => {
                action.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    const text = this.querySelector('span').textContent;
                    
                    // 点赞功能
                    if (icon.classList.contains('fa-heart')) {
                        if (this.classList.contains('liked')) {
                            this.classList.remove('liked');
                            icon.classList.remove('fas');
                            icon.classList.add('far');
                            this.querySelector('span').textContent = parseInt(text) - 1;
                            showToast('已取消点赞');
                        } else {
                            this.classList.add('liked');
                            icon.classList.remove('far');
                            icon.classList.add('fas');
                            this.querySelector('span').textContent = parseInt(text) + 1;
                            showToast('点赞成功');
                        }
                    } 
                    // 评论功能
                    else if (icon.classList.contains('fa-comment')) {
                        showToast('查看评论');
                        // 滚动到评论区
                        document.querySelector('.comments-section').scrollIntoView({
                            behavior: 'smooth'
                        });
                    } 
                    // 收藏功能
                    else if (icon.classList.contains('fa-bookmark')) {
                        if (icon.classList.contains('far')) {
                            icon.classList.remove('far');
                            icon.classList.add('fas');
                            showToast('收藏成功');
                        } else {
                            icon.classList.remove('fas');
                            icon.classList.add('far');
                            showToast('已取消收藏');
                        }
                    } 
                    // 分享功能
                    else if (icon.classList.contains('fa-share-alt')) {
                        showToast('分享帖子');
                    }
                });
            });
            
            // 评论操作按钮
            commentActionBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const icon = this.querySelector('i');
                    
                    // 评论点赞
                    if (icon.classList.contains('fa-heart')) {
                        if (this.classList.contains('liked')) {
                            this.classList.remove('liked');
                            icon.classList.remove('fas');
                            icon.classList.add('far');
                            const count = parseInt(this.textContent.trim().split(' ')[1]);
                            this.innerHTML = '<i class="far fa-heart"></i> ' + (count - 1);
                            showToast('已取消点赞');
                        } else {
                            this.classList.add('liked');
                            icon.classList.remove('far');
                            icon.classList.add('fas');
                            const count = parseInt(this.textContent.trim().split(' ')[1]);
                            this.innerHTML = '<i class="fas fa-heart"></i> ' + (count + 1);
                            showToast('点赞成功');
                        }
                    }
                });
            });
            
            // 回复按钮
            replyBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const authorName = this.closest('.comment-meta').querySelector('.comment-author').textContent;
                    commentInput.value = '@' + authorName + ' ';
                    commentInput.focus();
                    // 自动调整输入框高度
                    commentInput.style.height = 'auto';
                    commentInput.style.height = (commentInput.scrollHeight) + 'px';
                });
            });
            
            // 评论输入框自动调整高度
            commentInput.addEventListener('input', function() {
                this.style.height = 'auto';
                // 限制最大高度
                if (this.scrollHeight > 120) {
                    this.style.height = '120px';
                    this.style.overflowY = 'auto';
                } else {
                    this.style.height = (this.scrollHeight) + 'px';
                    this.style.overflowY = 'hidden';
                }
            });
            
            // 发送评论
            sendCommentBtn.addEventListener('click', function() {
                const commentText = commentInput.value.trim();
                if (commentText) {
                    showToast('评论发送成功');
                    commentInput.value = '';
                    commentInput.style.height = '40px';
                    commentInput.style.overflowY = 'hidden';
                } else {
                    showToast('请输入评论内容');
                }
            });
            
            // 取消评论
            cancelCommentBtn.addEventListener('click', function() {
                commentInput.value = '';
                commentInput.style.height = '40px';
                commentInput.style.overflowY = 'hidden';
            });
        }
        
        // 初始化
        function init() {
            bindEvents();
        }
        
        // 启动
        init();
    </script>
</body>
</html>
